ALTER TABLE phpbb_block_variable CHANGE type type TINYINT( 1 ) DEFAULT '0' NOT NULL;

##################################################################################################
####### Only Execute these lines if you haven't installed Dynamic Column width hack yet ##########
##################################################################################################
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Header width', 'Width of forum-wide left column in pixels', 'header_width', '', '', 1, '@Portal Config');
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Footer width', 'Width of forum-wide right column in pixels', 'footer_width', '', '', 1, '@Portal Config');
##################################################################################################
####### Only Execute these lines if you haven't installed Dynamic Column width hack yet ##########
##################################################################################################

INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Cache File Locking', 'can avoid cache corruption under bad circumstances', 'md_cache_file_locking', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Cache Write Control', 'detect some corrupt cache files', 'md_cache_write_control', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Cache Read Control', 'a control key is embeded in cache file', 'md_cache_read_control', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Cache Read Control Type', 'Type of read control (only if read control is enabled)', 'md_cache_read_type', 'md5 hash control, crc32 hash control, length only test', 'md5,crc32,strlen', 2, '@Portal Config');
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Cache File Name Protection', '', 'md_cache_filename_protect', '', '', 4, '@Portal Config');
INSERT INTO phpbb_block_variable (label, sub_label, config_name, field_options, field_values, type, block) VALUES ('Cache Automatic Serialization', 'Enable / disable automatic serialization', 'md_cache_serialize', '', '', 4, '@Portal Config');

ALTER TABLE phpbb_blocks CHANGE active active TINYINT( 1 ) DEFAULT '1' NOT NULL;
ALTER TABLE phpbb_blocks CHANGE view view TINYINT( 1 ) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_blocks CHANGE cache cache TINYINT( 1 ) DEFAULT '0' NOT NULL;
ALTER TABLE phpbb_blocks CHANGE type type TINYINT( 1 ) DEFAULT '1' NOT NULL;

ALTER TABLE phpbb_blocks ADD border tinyint(1) NOT NULL default '1';
ALTER TABLE phpbb_blocks ADD titlebar tinyint(1) NOT NULL default '1';
ALTER TABLE phpbb_blocks ADD background tinyint(1) NOT NULL default '1';
ALTER TABLE phpbb_blocks ADD local tinyint(1) NOT NULL default '0';
ALTER TABLE phpbb_blocks ADD groups tinytext NOT NULL;

ALTER TABLE phpbb_layout CHANGE forum_wide forum_wide TINYINT( 1 ) DEFAULT '1' NOT NULL;

ALTER TABLE phpbb_layout ADD view tinyint(1) NOT NULL default '0';
ALTER TABLE phpbb_layout ADD groups tinytext NOT NULL;

INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('header_width', '150');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('footer_width', '');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('md_cache_file_locking', '1');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('md_cache_write_control', '1');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('md_cache_read_control', '1');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('md_cache_read_type', 'md5');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('md_cache_filename_protect', '0');
INSERT INTO phpbb_portal_config (config_name, config_value) VALUES ('md_cache_serialize', '1');

